package com.ysd.lis.controller.cri;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.cri.CriticalValReportDto;
import com.ysd.lis.entity.cri.CriCriticalReport;
import com.ysd.lis.service.cri.CriCriticalReportService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wanghuaixing
 * @since 2025-02-13
 */
@RestController
@RequestMapping("/cri/critical/report")
public class CriCriticalReportController extends BaseController {

    @Autowired
    CriCriticalReportService labCriticalReportService;

    @ApiOperation("获取危急值上报信息")
    @PostMapping("/findCriticalReportInfo")
    public Result findCriticalReportInfo(@RequestBody CriticalValReportDto criticalReportDto) {
        return labCriticalReportService.findCriticalReportInfo(criticalReportDto);
    }

    @ApiOperation("护士处理")
    @PostMapping("/nurseChk")
    public Result nurseChk(@RequestBody CriCriticalReport criCriticalReport) {
        return labCriticalReportService.nurseChk(criCriticalReport);
    }

    @ApiOperation("危急值审核")
    @PostMapping("/criticalReportChk")
    public Result criticalReportChk(@RequestBody CriCriticalReport criCriticalReport) {
        return labCriticalReportService.criticalReportChk(criCriticalReport);
    }
    @ApiOperation("获取危急值信息")
    @GetMapping("/getCriticalReport")
    public Result getCriticalReport(@RequestParam("isChk")String isChk,@RequestParam("userCode")String userCode,@RequestParam("type")String type) {
        return labCriticalReportService.getCriticalReport(isChk,userCode,type);
    }

    @ApiOperation("护士处理")
    @GetMapping("/getDoctorByDept")
    public Result getDoctorByDept(CriCriticalReport criCriticalReport) {
        return labCriticalReportService.getDoctorByDept(criCriticalReport);
    }

    @ApiOperation("处置科室分布")
    @GetMapping("/deptSumQuery")
    public Result deptSumQuery() {
        return labCriticalReportService.deptSumQuery();
    }

    @ApiOperation("未确认危急值查询")
    @PostMapping("/findNotReceCriticaltInfo")
    public Result findNotReceCriticaltInfo(@RequestBody CriticalValReportDto criticalReportDto) {
        return labCriticalReportService.findNotReceCriticaltInfo(criticalReportDto);
    }

    @ApiOperation("未处理危急值查询")
    @PostMapping("/findUntreatedCriticaltInfo")
    public Result findUntreatedCriticaltInfo(@RequestBody CriticalValReportDto criticalReportDto) {
        return labCriticalReportService.findUntreatedCriticaltInfo(criticalReportDto);
    }
    @ApiOperation("获取BI数据")
    @GetMapping("/getBIData")
    public Result getBIData() {
        return labCriticalReportService.getBIData();
    }

    @ApiOperation("获取驾驶舱数据")
    @GetMapping("/getLargeScreenData")
    public Result getLargeScreenData() {
        return labCriticalReportService.getLargeScreenData();
    }

}
